<html>
  <head>
    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
    <title>pvm_send</title>
  </head>
  <body bgcolor="#FFFFFF">
    <center>Scilab function</center>
    <div align="right">Last update : 13/07/2005</div>
    <p>
      <b>pvm_send</b> -  immediately sends (or multicast) data.  </p>
    <h3>
      <font color="blue">Calling Sequence</font>
    </h3>
    <dl>
      <dd>
        <tt>[info] = pvm_send(tids,buff,msgtag)  </tt>
      </dd>
    </dl>
    <h3>
      <font color="blue">Parameters</font>
    </h3>
    <ul>
      <li>
        <tt>
          <b>tids</b>
        </tt>: row of integers, contains the task IDs of the tasks to be sent to.</li>
      <li>
        <tt>
          <b>buff</b>
        </tt>: scilab variable.</li>
      <li>
        <tt>
          <b>msgtag : integer, message tag supplied by the user.  msgtag should be</b>
        </tt>&gt;= 0.  It allows the user's program to distinguish between different kinds of messages .</li>
      <li>
        <tt>
          <b>info</b>
        </tt>: integer, status code returned by the routine. Values less than zero indicate an error.</li>
    </ul>
    <h3>
      <font color="blue">Description</font>
    </h3>
    <p>
      <tt>
        <b>pvm_send</b>
      </tt> 
    sends (or multicasts) a message 
    to the PVM process identified in the <tt>
        <b>tids</b>
      </tt> 
    array. Note that the message is not sent to the caller even if listed
    in the array of tids. <tt>
        <b>msgtag</b>
      </tt>
    is used to label the content of the message.</p>
    <p>
    The returned value will be &gt;= 0 if 
    the call is successful and will be 
    will be &lt; 0 if some error occurs.</p>
    <p>
    The <tt>
        <b>pvm_send</b>
      </tt> routine is asynchronous.  Computation on the sending
    processor resumes as soon as the message is safely on its way to the
    receiving processor.  This is in contrast to synchronous
    communication, during which computation on the sending processor halts
    until the matching receive is executed by the receiving processor.</p>
    <p>
    If a multicast is performed, <tt>
        <b>pvm_send</b>
      </tt>  first determines which other
    pvmds contain the specified tasks.  Then passes the message to these
    pvmds which in turn distribute the message to their local tasks
    without further network traffic.</p>
    <p>
    The PVM model guarantees the following about message order.  If task 1
    sends message A to task 2, then task 1 sends message B to task 2,
    message A will arrive at task 2 before message B.  Moreover, if both
    messages arrive before task 2 does a receive, then a wildcard receive
    will always return message A.</p>
    <p>
    Terminating a PVM task immediately after sending a message or messages
    from it may result in those messages being lost.  To be sure, always
    call pvm_exit() before stopping.</p>
    <h3>
      <font color="blue">See Also</font>
    </h3>
    <p>
      <a href="pvm_recv.htm">
        <tt>
          <b>pvm_recv</b>
        </tt>
      </a>,&nbsp;&nbsp;<a href="pvm_bcast.htm">
        <tt>
          <b>pvm_bcast</b>
        </tt>
      </a>,&nbsp;&nbsp;</p>
  </body>
</html>
